#include <iostream>
using namespace std;

class Person
{
public:
    int getAge()    //内存占用8个字节
    {
        return m_age;
    }

private:
    int m_age;
};

//继承的语法
class Student:public Person
{
public:
    int getScore()
    {
        return m_score;
    }

protected:
    int getId()
    {
        return m_Id;
    }
    int m_Id;

private:
    int m_score;
};
class GoodStudent:private Student
{
public:
    int getIQ()
    {
        return m_IQ;
    }

private:
    int m_IQ;
};

int main()
{
    cout<<"hello world"<<endl;

    GoodStudent s;
    cout<<"sizeof(s):"<<sizeof(s)<<endl;

    cout<<s.getId()<<endl;
    cout<<s.getScore()<<endl;

    return 0;
}